pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
DataFrame 與 特定欄位corr
np.abs(X_tr.corrwith(y_tr['time_to_failure'])).sort_values(ascending=False).head(12)
pandas iterrows with tqdm
' for jupyter notebook'
from tqdm import tqdm_notebook as tqdm
' for prompt'
from tqdm import tqdm
for index, row in tqdm(df.iterrows(), total=df.shape[0]):
print("index",index)
DataFrame col rename
df.rename( columns={"A": "a", "B": "c"})